/**
 * 在Es5的格式下，声明一个const
 * 注意：这里需要是 ‘严格模式下’
 */
"use strict";
var obj = {};
obj.a = "1";

Object.defineProperty(obj, "a", {
  writable: false,
});

Object.defineProperty(obj, "a", {
  writable: false,
  enumerable: false,
  configurable: false,
  value: this.obj.a,
  get: () => obj.foo,
  set: (value) => (obj.foo = value),
});

obj.a = 12;
console.log(obj.a);
